package com.bill.common.business.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.sinba.common.entity.BaseDomainEntity;

//匹配成功
@SuppressWarnings({ "rawtypes", "serial" })
@Entity
@Table(name="b_match")
public class Match extends BaseDomainEntity{
	@Id
    @GeneratedValue( strategy = GenerationType.AUTO )
	private Long id;
	@ManyToOne
	private Buy buy;//买出ID
	@ManyToOne
	private Sell sell;//
	private Long matchMoney;//匹配金额
	private Integer status=0;//状态(0匹配成功，1已汇款，2交易成功,3未收到款项，4汇款超时,5收款确认超时,6取消)
	private String imgUrl;	//凭证图片地址
	private String message;	//留言
	private Date messageTime;	//留言时间
	private Date closeTime;//关闭时间
	private boolean isCalculated=false;//是否已计算
	private String confirmType;//确认方式(48小时自动确认)
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public Buy getBuy() {
		return buy;
	}
	public void setBuy(Buy buy) {
		this.buy = buy;
	}
	public Sell getSell() {
		return sell;
	}
	public void setSell(Sell sell) {
		this.sell = sell;
	}
	public Long getMatchMoney() {
		return matchMoney;
	}
	public void setMatchMoney(Long matchMoney) {
		this.matchMoney = matchMoney;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public String getImgUrl() {
		return imgUrl;
	}
	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	public Date getMessageTime() {
		return messageTime;
	}
	public void setMessageTime(Date messageTime) {
		this.messageTime = messageTime;
	}
	public boolean isCalculated() {
		return isCalculated;
	}
	public void setCalculated(boolean isCalculated) {
		this.isCalculated = isCalculated;
	}
	public Date getCloseTime() {
		return closeTime;
	}
	public void setCloseTime(Date closeTime) {
		this.closeTime = closeTime;
	}
	public String getConfirmType() {
		return confirmType;
	}
	public void setConfirmType(String confirmType) {
		this.confirmType = confirmType;
	}
	
}
